
'use strict';

// This gulpfile makes use of new JavaScript features.
// Babel handles this without us having to do anything. It just works.
// You can read more about the new JavaScript features here:
// https://babeljs.io/docs/learn-es2015/
require('events').defaultMaxListeners=0;

import path from 'path';
import fs from 'fs';
import gulp from 'gulp';
import del from 'del';
import merge from 'merge-stream';
import process from 'process';
import source from 'vinyl-source-stream';
import buffer from 'vinyl-buffer';
import runSequence from 'run-sequence';
import browserSync from 'browser-sync';
import gulpLoadPlugins from 'gulp-load-plugins';
import requireDirectory from 'require-directory';
import sprintf from "sprintf";

const $ = gulpLoadPlugins();

gulp.task('upload', ()=> {
	console.log("Uploading...");
    return gulp.src("api/**/*.*")
        .pipe($.scp2({
            host: "ssh.huan68.com",
            username: "root",
            password: "5tgb^YHN",
            dest: "/home/HX/chatAPI/api"
        }))
        .on('error', function (err) {
            console.log(err)
        })
});

